package com.aaa.goodsservice.config;

/**
 * @Author: YuXin
 * @Date : Created in 2020/11/4 14:15
 * @ClassName : MyRule
 * @Description :
 * @Package_Name : com.aaa.goodsservice.config
 */

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RoundRobinRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MyRule {
    /**
     * 配置负载均衡策略
     */
    @Bean
    public IRule iRule() {
        //轮询
        return new RoundRobinRule();

    }
}
